package cn.fbs.dao.mysql;

import cn.fbs.model.TImageInfo;
import cn.fbs.vo.ImageEvaluateVo;
import cn.fbs.vo.TImageInfoVo;
import cn.fbs.vo.TImageItemVo;
import cn.fbs.vo.TProductInfoVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface TImageInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TImageInfo record);

    int insertSelective(TImageInfo record);

    TImageInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TImageInfo record);

    int updateByPrimaryKeyWithBLOBs(TImageInfo record);

    int updateByPrimaryKey(TImageInfo record);

    List<TImageInfoVo> selectProductByTargetType(Long targetType);

    List<TProductInfoVo> searchProduct(@Param("targetType") Long targetType,
                                       @Param("imageName")String imageName);

    List<TImageInfoVo> selectProductByTargetTypes(@Param("targetTypes") String targetTypes,@Param("searchName") String searchName);

    void deleteByIds(@Param("idsStr") String idsStr);

    TImageItemVo getImageItem(Integer id);

    ImageEvaluateVo getImageEvaluate(Long id);

    List<Object> selectByIdsStr(@Param("idsStr")String imageIdsStr);

    List<Map<String, Object>> getImageStatistics();

    TImageInfo getImageByFileUrl(@Param("fileUrl") String fileUrl);
}